package com.payment.ktb.activity.main4;

import android.os.Bundle;
import android.widget.TextView;

import com.payment.ktb.R;
import com.payment.ktb.activity.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by admin on 2017/9/3.
 */

public class OrderCenterResultActivity extends BaseActivity {



    @BindView(R.id.tv_ordercenterresult_price)
    TextView tv_ordercenterresult_price;
    @BindView(R.id.tv_ordercenterresult_status)
    TextView tv_ordercenterresult_status;
    @BindView(R.id.tv_ordercenterresult_type)
    TextView tv_ordercenterresult_type;
    @BindView(R.id.tv_ordercenterresult_bank)
    TextView tv_ordercenterresult_bank;
    @BindView(R.id.tv_ordercenterresult_bankno)
    TextView tv_ordercenterresult_bankno;
    @BindView(R.id.tv_ordercenterresult_orderno)
    TextView tv_ordercenterresult_orderno;
    @BindView(R.id.tv_ordercenterresult_time)
    TextView tv_ordercenterresult_time;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ordercenterresult);
        initTitle("订单详情");
        ButterKnife.bind(this);
        initData();

    }

    private void initData() {

        tv_ordercenterresult_price.setText("¥ " + getIntent().getStringExtra("orderPrice"));

        if (getIntent().getStringExtra("orderStatusName").equals("支付失败")) {
            tv_ordercenterresult_status.setTextColor(getResources().getColor(R.color.red));
        }else if (getIntent().getStringExtra("orderStatusName").equals("支付成功")) {
            tv_ordercenterresult_status.setTextColor(getResources().getColor(R.color.green));
        }else {
            tv_ordercenterresult_status.setTextColor(getResources().getColor(R.color.text666666));
        }
        tv_ordercenterresult_status.setText(getIntent().getStringExtra("orderStatusName"));
        tv_ordercenterresult_type.setText(getIntent().getStringExtra("goodsName"));
        tv_ordercenterresult_bank.setText(getIntent().getStringExtra("cardBank"));
        tv_ordercenterresult_bankno.setText(getIntent().getStringExtra("cardNo"));
        tv_ordercenterresult_orderno.setText(getIntent().getStringExtra("orderNo"));
        tv_ordercenterresult_time.setText(getIntent().getStringExtra("orderReqTime"));
    }
}
